Skip to content

Matchmaking button#974

Open
iDRXGamer wants to merge 28 commits into
CnCNet:developfrom
iDRXGamer:develop
Open

Matchmaking button#974
iDRXGamer wants to merge 28 commits into
CnCNet:developfrom
iDRXGamer:develop

Conversation

@iDRXGamer
Copy link
Copy Markdown

@iDRXGamer iDRXGamer commented Apr 6, 2026

Screenshot 2026-04-06 191925 Screenshot 2026-04-06 191912

I have added a new Matchmaking button to the client. This feature allows players to enter a queue after selecting a game mode. Once another player is found in the queue, the system automatically creates a room, assigns one player as the host, and prepares to start the game.

Currently, the room are visible . I need to make it hidden so the game just start without see the room and inside the room

Closes #987

iDRXGamer and others added 10 commits March 20, 2026 19:58
- Add `btnMatchmaking` toggle button in CnCNet lobby with state tracking.
- Implement Queue System:
  * Users enter queue via MatchmakingService socket server for specific mode.
  * Server triggers MatchFound event specifying channel, host and player list.
  * Ensures fully automated room creation for Host and joint transitions for Guest.
- Support Multiple Matchmaking Modes:
  * 1v1: Strictly filters 2-player maps with preset fair 1v1 starting options.
  * 2v2/2v2v2v2: Dynamic options configured by server setups supporting groups.
- General Fixes:
  * Fix LeaveGameLobby NullReference inside BroadcastGame triggers.
  * Disable instant instant triggers/countdown on creation setup.
  * strict backend Map MaxPlayers filter logic during room creations.
- Implement fuzzy map name matching in CnCNetGameLobby to ignore player count prefixes
- Highlight auto-selected matchmaking map dynamically via RefreshMapSelectionUI
- Add '#nullable enable' annotations to all core matchmaking components
- Replace implicit 'var' declarations with explicit types across the solution
- Enforce strict block spacing and formatting rules per project guidelines
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 6, 2026

Nightly build for this pull request:

  • artifacts.zip
    This comment is automatic and is meant to allow guests to get latest automatic builds without registering. It is updated on every successful build.

@11EJDE11
Copy link
Copy Markdown
Member

11EJDE11 commented Apr 6, 2026

Thanks for contributing, iDRXG. I've only had a quick squizz through the code and there's a few issues that stick out:

  1. You don't need a separate logger for matchmaking, just use the normal client log. You can keep it in there while testing but switch to the normal log when it's ready.
  2. Don't use map names as identifiers - use the map hash.
  3. Our client is not just for Yuri's Revenge. It's a generic client used by other games and mods so features need to be completely configurable through inis (pretty much all of MatchmakingSettings.cs would need changing, probably some of your layout too). Some mods would want match making, others won't. Some will want the button in a different place. Some mods might not have certain colors or sides or allied/soviet, etc.
    The Yuri's Revenge package is here: https://github.com/CnCNet/cncnet-yr-client-package/
    So in the client it should be a generic matchmaking feature that then gets customised through the ini files in the mod's package.

I suggest you come into xna-client-chat on Mod Haven on Discord and have a chat about your idea. What are you trying to achieve, how you see it working - not just for the players, but behind the scenes with the code too. We can let you know if you're going down the right path or not. Also have a look through the PR that kerbiter linked you on Discord.

@Rampastring
Copy link
Copy Markdown
Member

CnCNet also has a quick match API. Might be better to hook the client to that instead.

@Metadorius
Copy link
Copy Markdown
Member

This is what #336 was doing, but it's unfortunately abandoned

@iDRXGamer
Copy link
Copy Markdown
Author

iDRXGamer commented Apr 8, 2026 via email

@iDRXGamer iDRXGamer marked this pull request as ready for review April 18, 2026 00:40
@iDRXGamer
Copy link
Copy Markdown
Author

iDRXGamer commented Apr 18, 2026

I am done I hope u try it and tell me if there any bugs

CnCNet/cncnet-yr-client-package#882 is connected to this

@iDRXGamer
Copy link
Copy Markdown
Author

@11EJDE11 can u check now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Match Making Feature

5 participants